﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using Dropthings.DAL;

namespace Dropthings.Business.Facade
{
    partial class Facade
    {
        //获取某个建筑(所有建筑)某一天在工作时间(非工作时间)时的各小时耗电量
        public DataSet GetAmmeterTimeDatasInWorkTimeOrNot(string identifyCode, int year, int month, int day,bool isWorkTime)
        {
            if (string.IsNullOrEmpty(identifyCode)) return null;
            UQ_GetAmmeterTimeDatasInOrNotinWorkTime query = new UQ_GetAmmeterTimeDatasInOrNotinWorkTime(identifyCode, year, month, day, isWorkTime);
            return query.ExecuteDataset();
        }
        
        //获取电能的分项信息
        public DataSet GetAmmeterItemInfo()
        {
            UQ_GetAmmeterItemInfo query = new UQ_GetAmmeterItemInfo();
            return query.ExecuteDataset();
        }

        //获取某个建筑(所有建筑)某一月的各天耗电量
        public DataSet GetAmmeterDayDatasInMonth(string identifyCode, int year, int month)
        {
            if (string.IsNullOrEmpty(identifyCode)) return null;
            UQ_GetAmmeterDayDatasInMonth query = new UQ_GetAmmeterDayDatasInMonth(identifyCode, year, month);
            return query.ExecuteDataset();
        }
        
        //获取某个建筑(所有建筑)某一年的各月耗电量
        public DataSet GetAmmeterMonthDatasInYear(string identifyCode, int year)
        {
            if (string.IsNullOrEmpty(identifyCode)) return null;
            UQ_GetAmmeterMonthDatasInYear query = new UQ_GetAmmeterMonthDatasInYear(identifyCode, year);
            return query.ExecuteDataset();
        }

        //获取某一年各行业该年的耗电量
        public DataSet GetAmmeterYearDatasGroupbyProperty(int year)
        {
            UQ_GetAmmeterYearDatasGroupbyProperty query = new UQ_GetAmmeterYearDatasGroupbyProperty(year);
            return query.ExecuteDataset();
        }
        //获取某一年某个行业各建筑单位每个分项的耗电量
        public DataSet GetAmmeterYearDatasByProperty(int year,string property)
        {
            UQ_GetAmmeterYearDatasByProperty query = new UQ_GetAmmeterYearDatasByProperty(year, property);
            return query.ExecuteDataset();
        }
        //获取某一年某个建筑单位(所有建筑单位)的电费
        public DataSet GetAmmeterTotalMoneyInYear(string identifyCode, int year)
        {
            if (string.IsNullOrEmpty(identifyCode)) return null;
            UQ_GetAmmeterTotalMoneyInYear query = new UQ_GetAmmeterTotalMoneyInYear(identifyCode, year);
            return query.ExecuteDataset();
        }
        //获取某一年某个建筑单位(所有建筑单位)各个月的电费
        public DataSet GetAmmeterMonthMoneyInYear(string identifyCode, int year)
        {
            if (string.IsNullOrEmpty(identifyCode)) return null;
            UQ_GetAmmeterMonthMoneyInYear query = new UQ_GetAmmeterMonthMoneyInYear(identifyCode, year);
            return query.ExecuteDataset();
        }

        //获取某一年某个建筑单位（所有建筑单位）每个分项的耗电量
        public DataSet GetAmmeterYearDatasGroupbyEnergyItemNo(string identifyCode, int year)
        {
            UQ_GetAmmeterYearDatasGroupbyEnergyItemNo query = new UQ_GetAmmeterYearDatasGroupbyEnergyItemNo(identifyCode, year);
            return query.ExecuteDataset();
        }
        //获取某一年某个建筑单位(所有建筑单位) 每个分项的 各个月的耗电量
        public DataSet GetAmmeterMonthDataInYearByEnergyItemNo(string identifyCode, string energyItemNo, int year)
        {
            if (string.IsNullOrEmpty(identifyCode)) return null;
            UQ_GetAmmeterMonthDataInYearByEnergyItemNo query = new UQ_GetAmmeterMonthDataInYearByEnergyItemNo(identifyCode,energyItemNo,year);
            return query.ExecuteDataset();
        }
    }
}
